{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=296
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	a,b,c:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(a,b,c);
if (a=b) and (b=c) then write(3) else
if (a=b) or (a=c) or (b=c) then write(2) else write(0);
end.